//
// C++ Interface: xmlconfig
//
// Description:
//
//
// Author: Willi Ballenthin <wilbal1087@gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef XMLCONFIG_H
#define XMLCONFIG_H



#include <QtCore>
#include <QDomDocument>
#include <QDomElement>
#include "config.h"

/**
This class reads configuration data from an XML file and sets program variables accordingly.

	@author Willi Ballenthin <wilbal1087@gmail.com>
*/
class XMLConfig:public Config
{
public:
    XMLConfig();

    XMLConfig(QIODevice* iodevice);

    ~XMLConfig();

    bool setIODevice(QIODevice* iodevice);

    bool setDOM(QDomDocument* dom);

    bool createDOM();

    bool matchConfigVersion(QString version);

    bool extractConfig();



private:
    QIODevice*    iodevice;
    QDomDocument* dom;

    // should this be an reference or an object
    // due to shallow/deep copy, this is currently
    // an object...
    QDomElement   currentConfigElement;
};

#endif
